﻿using KAsFrame.Common.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using KAsFrame.Common.Extensions;

namespace KAsFrame.Domain.Certificate.Dto
{
    public class CertificateDto : IEntityDto<long>
    {
        public long Uid { get; set; }
        public long Tid { get; set; }
        public string LabelInfos { get; set; }
        public IDictionary<string, string> LabelInfoDic
        {
            get
            {
                return LabelInfos.IsNullOrWhiteSpace() ? null : JsonConvert.DeserializeObject<Dictionary<string, string>>(LabelInfos);
            }
        }
        public DateTime? CreateTime { get; set; }
        public DateTime? UpdateTime { get; set; }
    }
}
